package org.mybatis3.test5;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test5 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Dog d1=(Dog) context.getBean("dog4");

        System.out.println(d1.getName());
        List<String> sons=d1.getSons();
        for (String name:sons){
            System.out.println("儿子:"+name);
        }
    }

}
